<%-- 
    Document   : CapNhatThongTinThanhVienSubpage
    Created on : May 16, 2011, 11:22:56 AM
    Author     : ToanNhan
--%>

<%@page import="Pojos.NhomThanhVien"%>
<%@page import="java.util.List"%>
<%@page import="Pojos.ThanhVien"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="script/CapNhatThongTinThanhVien.js"></script>
<% request.setCharacterEncoding("UTF-8");%>
<% ThanhVien tv = (ThanhVien) request.getAttribute("thanhVien");%>
<form name="frm" method="POST" id="frmDangKy" action="../CapNhatThongTinThanhVienControler">
    <input type="hidden" name="command" value="DangKyThanhVien"/>
    <div id="validationmsg"></div>
    <center>
        <table width="520px">
            <tr>
                <td colspan="2">
                    <span style="padding-left: 20px"><font color="RED" size="+3">Đăng ký thành viên</font></span>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    &nbsp;
                </td>
            </tr>
            <tr bgcolor="bisque">
                <td width="150px">
                    <span style="padding-left: 10px">Tên đăng nhập(*)</span>
                </td>
                <td>
                    <strong><%=tv.getUserName()%></strong>
                    <input type="hidden" value="<%=tv.getUserName()%>" name="userName"/>
                </td>
            </tr>
            <tr>
                <td width="150px">
                    <span style="padding-left: 10px">Mật khẩu(*)</span>
                </td>
                <td>
                    <input id="password" type="password" name="password" /><span id="errPassword" class="errmsg">Mật khẩu phải có ít nhất 6 ký tự</span>
                </td>
            </tr>
            <tr bgcolor="bisque">
                <td width="150px">
                    <span style="padding-left: 10px">Nhập lại password(*)</span>
                </td>
                <td>
                    <input id="retypePassword" type="password" name="retypePassword" /><span id="errRetypePassword" class="errmsg">Mật khẩu không giống</span>
                </td>
            </tr>
            <tr>
                <td width="150px">
                    <span style="padding-left: 10px">Nhóm thành viên</span>
                </td>
                <td>
                    <select name="nhomThanhVien" value="<%=tv.getNhomThanhVien().getMaNhomThanhVien()%>">
                        <%
                                    List<NhomThanhVien> lstNhomThanhVien = (List<NhomThanhVien>) request.getAttribute("nhomThanhVien");
                                    for (NhomThanhVien ntv : lstNhomThanhVien) {
                        %>
                        <option value="<%=ntv.getMaNhomThanhVien()%>"><%=ntv.getTenNhomThanhVien()%></option>
                        <%
                                    }
                        %>
                    </select>
                </td>
            </tr>


            <tr bgcolor="#CCC">
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="submit" name="btnLuu" value="Lưu" />
                </td>
            </tr>
        </table>
    </center>
</form>